#include <QtGui/QApplication>

#include "includes.h"

#include "Tableau.h"
#include "CardInfo.h"

#include "Skin.h"

#include "MainWindow.h"
#include "RaceInfo.h"

int main(int argc, char *argv[]) {
	QApplication a(argc, argv);
	
	MainWindow w;
	w.show();
	
	
	
	/*
	RaceInfo info;
	qDebug() << info;
	
	info.numberOfCards = 42;
	info.extensionAllowed = true;
	info.normalDistance = 700;
	
	qDebug() << info;
	
	
	QByteArray data;
	//data.append("Lol");
	
	QDataStream out(&data, QIODevice::WriteOnly);
	out.setVersion(QDataStream::Qt_4_6);
	
	out << info;
	
	
	RaceInfo n;
	
	qDebug() << n;
	QDataStream in(data); // in(&data,QIODevice::ReadOnly);
	in >> n;
	
	qDebug() << n;
	*/
	
	/*CardID id = Card::cardForProperties(CardInfo::Function_Safety, CardInfo::Nature_Light);
	CardInfo* nfo = Card::getInfo(id);
	
	if (nfo != NULL)
		qDebug() << nfo->getName();
	else
		qDebug() << "NULL";
	*/
	
	Team team;
	Tableau* t = team.getTableau();
	Player *p1, *p2;
	
	p1 = new Player("Ore-sama");
	p2 = new Player("Temee");
	team.addPlayer(p1);
	
	t->setWinDistance(500);
	/*
	
	t->play(Card::CardID_Distance_200);
	t->play(Card::CardID_Distance_100);
	t->play(Card::CardID_Distance_25);
	
	
	qDebug() << t->canPlay(p1,Card::CardID_Hazard_Accident)
			<< t->canPlay(p2,Card::CardID_Hazard_Accident);
	t->play(Card::CardID_Remedy_Roll);
	t->play(Card::CardID_Hazard_);
	t->play(Card::CardID_Safety_DrivingAce);
	t->play(Card::CardID_Safety_DrivingAce);
	qDebug() << t->canPlay(p1,Card::CardID_Hazard_Accident)
			<< t->canPlay(p2,Card::CardID_Hazard_Accident);
	*/
	//qDebug() << "Roll: " << t->canRollDistance();
	
	
	
	
	
	
	
	return a.exec();
}
